//
//  UICheckBox.m
//  Cloud189
//
//  Created by 21CN Vgo on 11-11-21.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "UICheckBox.h"


@implementation UICheckBox

- (id)initWithCoder:(NSCoder *)decoder
{
	if (self = [super initWithCoder:decoder])
	{
		self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
		
		[self addTarget:self action:@selector(checkBoxClicked) forControlEvents:UIControlEventTouchUpInside];
	}

	return self;
}

- (id)initWithFrame:(CGRect)frame
{
	if (self = [super initWithFrame:frame])
	{
		// Initialization code

		self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;

		[self addTarget:self action:@selector(checkBoxClicked) forControlEvents:UIControlEventTouchUpInside];
	}
	return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code.
}
*/

- (void)dealloc {
    [super dealloc];
}

- (IBAction)checkBoxClicked{
	self.selected = !self.selected;
}


@end
